<jsp:directive.page contentType="text/html;charset=UTF-8" />
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="../../WEB-INF/c.tld" prefix="c" %>


<div class="main">
	<div class="container">
		<h2><bean:message key="admin.list.mainTitle" /></h2>
		<c:if test="${success != null }">
			<div class="alert alert-success">
				<bean:message key="${success }" />
    		</div>
		</c:if>
		<c:if test="${error != null}">
			<div class="alert alert-error">
				<bean:message key="${error }" />
    		</div>
		</c:if>
		
		<div class="scrollable">
		<table class="table table-striped tableAdmin">
			<thead>
				<tr>
					<th><bean:message key="admin.Name" /></th>
					<th><bean:message key="admin.FirstName" /></th>
					<th><bean:message key="admin.login" /></th>
					<th><bean:message key="general.action" /></th>
				</tr>
			</thead>
			<tbody>
				<tr class="first">
					<td>${superAdmin.nom}</td>
						<td>${superAdmin.prenom}</td>
						<td>${superAdmin.loginUtilisateur}</td>
						<td>
							&nbsp;
						</td>
					</tr>
				<c:forEach items="${listAdmin}" var="admin">
					<tr>
						<td>${admin.nom}</td>
						<td>${admin.prenom}</td>
						<td>${admin.loginUtilisateur}</td>
						<td>
							<div class="listAction">
								<a href="<%= request.getContextPath() %>/update-admin.do?id=${admin.idUser}" title="Edit" alt="Edit"><div class="icon-edit"></div></a>
								<a href="<%= request.getContextPath() %>/delete-admin.do?id=${admin.idUser}" title="Remove" alt="Remove"><div class="icon-remove"></div></a>
							</div>
						</td>
					</tr>
				</c:forEach>
			</tbody>
    	</table>
    	</div>
    	<div class="linkCenter"><a class="btn btn-primary" href="<%= request.getContextPath() %>/new-admin.do"><bean:message key="admin.New" /></a></div>
	</div>
</div>